﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Shape
    {
        private string color;
        public string Color { get => color; set => color = value; }
        public Shape () { }
        public virtual double Area(){ return 0.0; }
     
    }

    class People {
        public void figure(Shape s) {
            Console.WriteLine(s.Area());
        }
    }
    class Circle : Shape{
        public override double Area () {
            Console.WriteLine("请输入圆形的半径");
            int a = int.Parse(Console.ReadLine());
            return a * 3.14;
        }
    }
    class Square : Shape{
        public override double Area () {
            Console.WriteLine("请输入正方形的边长");
            int a = int.Parse(Console.ReadLine());
            return a * a;
        }
    }
}
